﻿using Adnc.Shared.RpcServices.Rtos.Usr;
using Refit;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Adnc.Shared.RpcServices.Services
{
    public interface IUserRpcService : IRpcService
    {
        /// <summary>
        /// 获取用户的名称和头像
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        [Get("/usr/User/_userNameAndHead")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<List<UserNameAndHeadRto>>> GetUserNameAndHead([AliasAs("input")][Query(CollectionFormat.Multi)] IEnumerable<long> ids);

        /// <summary>
        /// 获取收货地址详情
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        [Get("/usr/Address/_detail")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<UserAddressRto>> GetAddressDetail(long Id);

        /// <summary>
        /// 获取用户等级
        /// </summary>
        /// <returns></returns>
        [Get("/usr/user/_grade")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<int>> GetUserGrade();


        /// <summary>
        /// 获取用户openId
        /// </summary>
        /// <returns></returns>
        [Get("/usr/user/_openId")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<string>> GetUserOpenId();

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        [Get("/usr/user/_userInfor")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<UserInforRto>> GetUserInfor();

        /// <summary>
        /// 钱包支付
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Post("/usr/wallet/_pay")]
        public Task<ApiResponse<bool>> WalletPay(WalletPaymentRto input);

        /// <summary>
        /// 获取用户钱包
        /// </summary>
        /// <returns></returns>
        [Get("/usr/wallet/_wallet")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<WalletRto>> GetUsrWallet();

        /// <summary>
        /// 获取用户云仓商品信息
        /// </summary>
        /// <returns></returns>
        [Get("/usr/Warehouse/_list")]
        [Headers("Authorization: Bearer")]
        public Task<ApiResponse<List<WarehouseRto>>> GetRPCUserWarehouse();
    }
}
